<%
//下载APP
layout("/inc/layout.html",{
title:'股东信息 - 工商变更 - 智慧洛龙',
keywords:'股东信息,工商变更,智慧洛龙',
description:'股东信息,工商变更,智慧洛龙',
style:'index.css'
}){
%>
<section class="container mt15">
    <div class="row">
        <div class="panel panel-info">
            <div class="panel-heading text-left"><b>营业执照变更</b></div>
            <div class="panel-body">
                <%
                if(isNotEmpty(shareholderList)){
                for(shareholder in shareholderList){
                %>
                <form id="shareholder_${shareholderLP.index}" class="form-horizontal" name="shareholderForm" method="post" role="form">
                    <input class="form-control" name="id" id="id" type="hidden" value="${shareholder.id!}">
                    <input class="form-control" name="changeId" id="changeId" type="hidden" value="${changeId!}">
                    <legend>第${shareholderLP.index}个股东信息：
                        <button onclick="$(this).parents('form').remove()" class="btn btn-danger mb5">删除</button>
                    </legend>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">股东姓名：</label>
                        <div class="col-sm-5">
                            <input name="name" class="form-control" placeholder="请输入股东姓名" type="text" value="${shareholder.name!}" required="required" aria-required="true" minlength="2"
                                   maxlength="50">
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">证件类型：</label>
                        <div class="col-sm-5">
                            <select class="form-control" name="cardType" required="required" aria-required="true" onclick="memberCardTypeSwitch(event)">
                                <option value="" ${isEmpty(shareholder.cardType)?'selected="selected"'}>请选择</option>
                                <option value="1" ${shareholder.cardType ==1?'selected="selected"'}>身份证</option>
                                <option value="2" ${shareholder.cardType ==2?'selected="selected"'}>营业执照副本</option>
                                <option value="3" ${shareholder.cardType ==3?'selected="selected"'}>其他有效证件</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">证件号码：</label>
                        <div class="col-sm-5">
                            <input name="cardNumber" class="form-control" value="${shareholder.cardNumber!}" placeholder="请输入证件号码" type="text" required="required" aria-required="true" minlength="8" maxlength="30">
                        </div>
                    </div>

                    <div class="form-group education-box">
                        <label class="col-sm-2 control-label">股东学历：</label>
                        <div class="col-sm-5">
                            <select class="form-control" name="education" required="required" aria-required="true">
                                <option value="" ${isEmpty(shareholder.education)?'selected="selected"'}>请选择</option>
                                <option value="1" ${shareholder.education ==1?'selected="selected"'}>初中</option>
                                <option value="2" ${shareholder.education ==2?'selected="selected"'}>高中</option>
                                <option value="3" ${shareholder.education ==3?'selected="selected"'}>中专</option>
                                <option value="4" ${shareholder.education ==4?'selected="selected"'}>大专</option>
                                <option value="5" ${shareholder.education ==5?'selected="selected"'}>本科</option>
                                <option value="6" ${shareholder.education ==6?'selected="selected"'}>研究生</option>
                                <option value="7" ${shareholder.education ==7?'selected="selected"'}>博士</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group phone-box">
                        <label class="col-sm-2 control-label">联系电话：</label>
                        <div class="col-sm-5">
                            <input name="phone" class="form-control" value="${shareholder.phone!}" placeholder="请输入电话" type="text" required="required" aria-required="true" minlength="8"
                                   maxlength="18">
                        </div>
                    </div>

                    <div class="form-group email-box">
                        <label class="col-sm-2 control-label">电子邮箱：</label>
                        <div class="col-sm-5">
                            <input name="email" class="form-control" value="${shareholder.email!}" placeholder="请输入电子邮箱" type="text" required="required" aria-required="true">
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">出资金额：</label>
                        <div class="col-sm-5">
                            <div class="input-group">
                                <input name="investmentAmount" class="form-control" value="${shareholder.investmentAmount!}" placeholder="请输入出资金额（万元）" type="number" required="required"
                                       aria-required="true" min="1" maxlength="10">
                                <span class="input-group-addon">万元</span>
                            </div>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">出资时间：</label>
                        <div class="col-sm-5">
                            <select class="form-control" name="InvestmentTime" required="required" aria-required="true">
                                <option value="" ${isEmpty(shareholder.education)?'selected="selected"'}>请选择</option>
                                <option value="1" ${shareholder.education ==1?'selected="selected"'}>10年</option>
                                <option value="2" ${shareholder.education ==2?'selected="selected"'}>11年</option>
                                <option value="3" ${shareholder.education ==3?'selected="selected"'}>12年</option>
                                <option value="4" ${shareholder.education ==4?'selected="selected"'}>13年</option>
                                <option value="5" ${shareholder.education ==5?'selected="selected"'}>14年</option>
                                <option value="6" ${shareholder.education ==6?'selected="selected"'}>15年</option>
                                <option value="7" ${shareholder.education ==7?'selected="selected"'}>16年</option>
                                <option value="8" ${shareholder.education ==8?'selected="selected"'}>17年</option>
                                <option value="9" ${shareholder.education ==9?'selected="selected"'}>18年</option>
                                <option value="10" ${shareholder.education ==10?'selected="selected"'}>19年</option>
                                <option value="11" ${shareholder.education ==11?'selected="selected"'}>20年</option>
                            </select>
                        </div>
                    </div>


                    <div class="form-group">
                        <label class="col-sm-2 control-label">出资方式：</label>
                        <div class="col-sm-5">
                            <label class="radio-inline" for="investmentMode0"><input type="checkbox" value="1" name="investmentModeList" id="investmentMode0" checked="checked" required>货币</label>
                            <label class="radio-inline" for="investmentMode1"><input type="checkbox" value="2" name="investmentModeList" id="investmentMode1" required>实物</label>
                            <label class="radio-inline" for="investmentMode2"><input type="checkbox" value="3" name="investmentModeList" id="investmentMode2" required>知识产权</label>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">证件正面照：</label>
                        <div class="col-sm-5">
                            <div class="input-group">
                                <input name="cardFrontPicture" class="form-control mb10" value="${shareholder.cardFrontPicture!}" type="text" readonly placeholder="请选择..." required="required">
                                <span class="input-group-btn">
                                    <input name="files" class="form-control cardFrontUploader" type="file">
                                </span>
                            </div>
                            <div class="cardFrontPictureShow center-block row">
                                <% if(isNotEmpty(shareholder.cardFrontPicture)){ %>
                                <div class="mb15 mt15">
                                    <div class="thumbnail images-box"><a href="${uploaderFilesDomain!'/'}${shareholder.cardFrontPicture!}" target="_blank">
                                        <img src="${uploaderFilesDomain!'/'}${shareholder.cardFrontPicture!}"></a>
                                    </div>
                                </div>
                                <% } %>
                            </div>
                            <div class="front-error-message"></div>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">证件反面照：</label>
                        <div class="col-sm-5">
                            <div class="input-group">
                                <input name="cardBackPicture" class="form-control mb10" value="${shareholder.cardBackPicture!}" type="text" readonly placeholder="请选择..." required="required">
                                <span class="input-group-btn">
                                       <input name="files" class="form-control cardBackUploader" type="file">
                                </span>
                            </div>
                            <div class="cardBackPictureShow center-block row">
                                <% if(isNotEmpty(shareholder.cardBackPicture)){ %>
                                <div class="mb15 mt15">
                                    <div class="thumbnail images-box"><a href="${uploaderFilesDomain!'/'}${shareholder.cardBackPicture!}" target="_blank">
                                        <img src="${uploaderFilesDomain!'/'}${shareholder.cardBackPicture!}"></a>
                                    </div>
                                </div>
                                <% } %>
                            </div>
                            <div class="back-error-message"></div>
                        </div>
                    </div>
                </form>
                <%
                }
                }
                %>
                <hr>
                <div id="moreShareholder"></div>
                <div class="col-sm-offset-2 col-sm-5">
                    <button type="button" id="addShareholder" class="btn btn-info btn-lg btn-block"><i class="iconfont icon-tianjiafang"></i>添加股东</button>
                </div>
            </div>
            <div class="panel-footer">
                <div class="col-sm-offset-3 clearfix">
                    <div class="mt5 mb5 block col-sm-3">
                        <a href="/companyChange/base/${companyChange.applyId}" class="btn btn-warning btn-lg btn-outline btn-block">上一步</a>
                    </div>
                    <div class="mt5 mb5 block col-sm-3">
                        <a href="/companyChangeMember/legal/${companyChange.id}" class="btn btn-success btn-lg btn-outline btn-block">跳过</a>
                    </div>
                    <div class="mt5 mb5 block col-sm-3">
                        <button type="button" id="doSubmit" class="btn btn-danger btn-lg btn-outline btn-block">保存</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>

<% } %>
<script>
    require(['modules/company_change'], function (apply) {
        apply.shareholder(${changeId!});
    });
</script>
</body>
</html>